Skip to content

fix(marketx): restore orphaned safety tests and harden CI - #275

Merged
Cybermaxi7 merged 1 commit into
MarketXpress:mainfrom
suleimanjem-hash:newcon
Aug 22, 2026
Merged

fix(marketx): restore orphaned safety tests and harden CI#275
Cybermaxi7 merged 1 commit into
MarketXpress:mainfrom
suleimanjem-hash:newcon

Conversation

@suleimanjem-hash

Copy link
Copy Markdown
Contributor

Summary

Fixes the orphaned MarketX source files and restores the 13 fee/volume safety tests that were previously invisible to the Rust toolchain.

This PR also removes stale duplicate sources and strengthens CI so orphaned Rust files and coverage regressions cannot silently pass again.

Changes

  • Wire test_integer_safety.rs and test_volume.rs into lib.rs.
  • Update the 13 tests to the current Soroban SDK and MarketX contract API.
  • Preserve and validate the existing overflow, fee arithmetic, volume, whitelist, and fee-tier assertions.
  • Migrate useful ContractError documentation from tarpaulin.rs into the live errors.rs.
  • Remove the stale duplicate tarpaulin.rs.
  • Remove the empty Automation.rs.
  • Add a coverage threshold to the Tarpaulin CI job.
  • Add CI validation to detect .rs files under contract src/ directories that are not reachable from their crate module tree.
  • Verify the new orphan-file check detects an intentionally unreferenced Rust source file.
  • Keep formatting, Clippy, build, tests, dependency audit, coverage, and SDK error-code parity checks passing.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • Optimized WASM build
  • Dependency audit
  • Coverage with enforced --fail-under threshold
  • SDK error-code parity check
  • Orphan Rust source detection

Result

The previously unreachable MarketX safety tests are now compiled and executed as part of the normal test suite, while CI now prevents similar dead source files and coverage regressions from going unnoticed.

Closes #272

@Cybermaxi7
Cybermaxi7 merged commit 8498252 into MarketXpress:main Aug 22, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[high] 1,013 lines of src/ are invisible to the toolchain — 13 overflow-safety tests have never run and no longer compile

2 participants